
var basePath="http://192.168.50.22:8080/"
var apiPath="https://passm.changjingbao.net/"

function getQueryString(name) {
    var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
    var r = window.location.search.substr(1).match(reg);
    if(r!=null)return  unescape(r[2]); return null;
}
function msg(message) {
    window.scrollTo(0, document.documentElement.clientHeight);
    setTimeout(function(){ layer.msg(message); }, 500);
}
function getUrlParamCN(name) {
    var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
    var r = decodeURI(window.location.search).substr(1).match(reg); //匹配目标参数
    if (r != null) return unescape(r[2]); return null; //返回参数值
}
function empty(data) {
    if(data==null||data==undefined||data==''){
        return true;
    } else {
        return false;
    }
}
function topDistance(doc) {
    var mTop = $(doc)[0].offsetTop;
    var sTop = $(window).scrollTop();
    return mTop;
}

